home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 50 / 050.d81 / video craps (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  9KB  |  291 lines

  1. 0 data255,255,255,231,255,255,255,0,255,159,255,255,255,249,255,0,255,159,255
  2. 1 data231,255,249,255,0,255,153,255,255,255,153,255,0,255,153,255,231,255,153
  3. 2 data255,0,255,153,255,153,255,153,255,0,0,0,0,24,24,0,0,0,240,96,96,102,9,9,6
  4. 3 poke53265,0:poke53280,5:poke53281,5:a=ti:b=rnd(-a):sc=5000:s=54272:gosub1000
  5. 4 pokes+24,5:poke53272,(peek(53272)and240)+12:pokea,127:poke1,51:poke781,9
  6. 5 poke782,0:poke90,0:poke91,216:poke88,0:poke89,56:sys41964:poke1,55:pokea,129
  7. 6 poke56,48:a=12288:forb=atoa+7:readc:pokeb,c:next:a=a+216:forb=atoa+39:readc
  8. 7 pokeb,c:next:a=a+80:forb=atoa+14:readc:pokeb,c:next:r=12:dimp(21),c$(22)
  9. 8 a$(0)="[144]   [146]":a$(1)="[144] [209] [146]":a$(2)="[144][209] [209][146]":a$(3)="[144][209]  [146]":a$(4)="[144]  [209][146]"
  10. 9 a$="  big ":b$="hardway ":c$=" craps ":d$=" place ":c$(0)="          "
  11. 10 c$(1)=c$(0):c$(2)="any craps ":c$(3)="  eleven  ":c$(4)="  field   "
  12. 11 c$(5)=a$+"6   ":c$(6)=a$+"8   ":c$(7)=b$+"4 ":c$(8)=b$+"6 ":c$(9)=b$+"8 "
  13. 12 c$(10)=b$+"10":c$(11)=c$+"2  ":c$(12)=c$+"3  ":c$(13)=c$+"12 ":ty%=4:ln%=4
  14. 13 c$(14)="  seven   ":c$(15)=d$+"4  ":c$(16)=d$+"5  ":c$(17)=d$+"6  "
  15. 14 c$(18)=d$+"8  ":c$(19)=d$+"9  ":c$(20)=d$+"10 ":c$(21)=c$(1):c$(22)=c$(0)
  16. 15 print"[147][158][176][195][195][195][178][195][195][195][178][195][195][178][195][195][178][195][195][178][195][195][178][195][195][178][195][195][195][178][195][195][195][195][195][195][195][195][195][195][195][174]";
  17. 16 a$="[194]   [194] [144]":b$=" [158][194]  [194]  [194]  [194]  [194]  [194]   ":printa$"d"b$"[194]   seven   [158][194]";
  18. 17 c$=" [158][171][195][195][219][195][195][219][195][195][219][195][195][219][195][195][219][195][195][195]":printa$"o"c$"[179]    4&1    [194]";
  19. 18 printa$"n"c$"[219][195][195][195][195][195][195][195][195][195][195][195][179]";:printa$"'"b$"[171][195][195]hardway[195][195][179]";
  20. 19 print"[194] p [194] [144]t [158][194] 4[194] 5[194] 6[194] 8[194] 9[194] 10[194] \ \ [194] ^ ^ [194]";:c$="[195][195][195][195][195][219][195][195][195][195][195][179]"
  21. 20 print"[194] a [194] [144] "b$"[194] 9&1 [194] 7&1 [194]";:b$="[158][194]                  "
  22. 21 print"[194] s [194] [144]p [158][171][195][195][177][195][195][177][195][195][177][195][195][177][195][195][177][195][195][195][219]"c$;:print"[194] s [194][144] a "b$"[194] ] ] [194] [ [ [194]";
  23. 22 printa$"s [158][194]   3%4%9%10%11    [194] 9&1 [194] 7&1 [194]";
  24. 23 print"[194] l [194] [144]s [158][194]  %           %   [171]"c$;
  25. 24 print"[194] i [194]   [194] 2             12 [194] @ [ [158][194] _ _ [158][194]";
  26. 25 print"[194] n [194][144]bar"b$"[194]15&1 [194] 30&1[194]";:a$="[194]   [171][195][195][195][219][195][195][195]"
  27. 26 print"[194] e [194][144]_ _[158][194]      field       [171]"c$;:b$=c$(0)+"    "
  28. 27 printa$"[174]"b$"[194] _ ^ [158][194] @ @ [158][194]";:c$="[195][195][195][195][195][195][195][195][195][195]"
  29. 28 print"[194]   [194]big[158][194]big[158][171]"c$"[195][195][195][195][179]15&1 [194] 30&1[194]";:printa$"[179]"b$"[171][195][195][195][195][195][177][195][195][195][195][195][179]";
  30. 29 a$="[194]   [194]   [194]   [194]":printa$"[144]  don't  bar  [158][194] any craps [158][194]";
  31. 30 print"[194]   [194] 6 [158][194] 8 [158][194][144]   pass  _ _  [158][194]    7&1    [194]";:printa$b$"[171]"c$"[195][189]";
  32. 31 print"[194]   [202][195][195][195][177][195][195][195][177]"c$"[195][195][195][195][179][144][176]"c$"[174]";:a$="[158][194]                 "
  33. 32 b$="         [194][144][194]          [194]":printa$b$;:print"[158][194]        pass line"b$;
  34. 33 printa$b$;:print"[158][202]"c$c$"[195][195][195][195][195][195][189][144][173]"c$"";:poke2023,125:poke56295,0:goto64
  35. 34 x=29:fory=21to23:xy$="          ":gosub35:next:return
  36. 35 poke783,peek(783)and254:poke782,x:poke781,y:sys65520:printxy$;
  37. 36 poke783,peek(783)or1:return
  38. 37 ifsc<2then34
  39. 38 gosub34:y=21:xy$="you have: ":gosub35:x=36-len(str$(sc)):y=23
  40. 39 xy$="$"+str$(sc):gosub35:gosub40:return
  41. 40 pokes+1,r:pokes+5,9:pokes+4,21:forz=1to900:next:pokes+4,20:return
  42. 41 gosub34:y=21:xy$="<[158]p>ass":gosub35:y=22:xy$="  <[158]d>on't":gosub35
  43. 42 x=35:y=23:xy$="pass":gosub35:goto40
  44. 43 gosub34:y=21:xy$="how much: ":gosub35:x=33:y=23:xy$="":gosub35
  45. 44 gosub261:poke1983,66:poke56255,0:p(a)=val(qx$):ifp(a)<2 or p(a)>2000then43
  46. 45 sc=sc-p(a):ifsc<0thensc=sc+p(a):goto43
  47. 46 return
  48. 47 gosub34:y=21:xy$=" <[158]b>et":gosub35:y=23:xy$="   <[158]r>oll ":gosub35:goto40
  49. 48 on t goto49,50,51,52,53,54
  50. 49 u=0:v=1:w=0:goto55
  51. 50 u=3:v=0:w=4:goto55
  52. 51 u=3:v=1:w=4:goto55
  53. 52 u=2:v=0:w=2:goto55
  54. 53 u=2:v=1:w=2:goto55
  55. 54 u=2:v=2:w=2
  56. 55 y=21:xy$=a$(u):gosub35:y=22:xy$=a$(v):gosub35:y=23:xy$=a$(w):gosub35
  57. 56 ifzz=6then40
  58. 57 ss=5*t:pokes+1,ss:pokes+5,2:pokes+6,5:pokes+4,33:pokes+4,32:return
  59. 58 forx1=1226to1546step40:pokex1,peek(x1)+n:next:forx1=1913to1921
  60. 59 pokex1,peek(x1)+n:next:return
  61. 60 forx1=1070to1430step40:pokex1,peek(x1)+n:next:forx1=1719to1723
  62. 61 pokex1,peek(x1)+n:next:forx1=1759to1763:pokex1,peek(x1)+n:next:return
  63. 62 xy$=""+xy$:y=21:gosub35:y=23:xy$="  loses":gosub35:gosub40:return
  64. 63 xy$=""+xy$:y=21:gosub35:y=23:xy$="   wins":gosub35:gosub40:return
  65. 64 poke53265,27:gosub37:ifsc<2then258
  66. 65 gosub41:n=128:b=-1:pt=0
  67. 66 getz$:ifz$=""then66
  68. 67 ifz$="p"thena=1:gosub58:goto70
  69. 68 ifz$="d"thena=2:gosub60:goto70
  70. 69 gosub277:goto66
  71. 70 gosub43
  72. 71 b=b+1:ifb>1thenb=1
  73. 72 gosub37
  74. 73 gosub47
  75. 74 getz$:ifz$=""then74
  76. 75 ifz$="r"then78
  77. 76 ifz$="b"thenc=3:goto214
  78. 77 gosub277:goto74
  79. 78 ifb=1then80
  80. 79 gosub34:y=21:xy$=" come-out":gosub35:y=23:xy$="   roll":gosub35:gosub40
  81. 80 gosub34:r=30:forzz=1to6:t=int(rnd(1)*6)+1:ift=d1thent=t+1
  82. 81 ift=7thent=1
  83. 82 x=30:d1=t:gosub48:t=int(rnd(1)*6)+1:ift=d2thent=t+1
  84. 83 ift=7thent=1
  85. 84 x=35:d2=t:gosub48:next:gosub34:t=d1+d2:r=12:print""
  86. 85 gosub34:n=-128:on t-1 goto86,96,107,120,129,141,150,162,172,184,193
  87. 86 ifb=1then89
  88. 87 u=0:ifp(1)>0thengosub204:goto89
  89. 88 u=1:gosub207
  90. 89 u=0:ifp(3)>0thenu=1:c=3:w=8:gosub211
  91. 90 u=0:ifp(4)>0thenc=4:gosub211
  92. 91 ifp(5)>0thenu=1:c=5:w=3:gosub211
  93. 92 u=0:ifp(12)>0thenu=1:c=12:w=31:gosub211
  94. 93 u=0:forc=13to15:ifp(c)>0thengosub211
  95. 94 next:ifb=1then71
  96. 95 goto64
  97. 96 ifb=1then99
  98. 97 u=0:ifp(1)>0thengosub204:goto99
  99. 98 u=1:gosub207
  100. 99 u=0:ifp(3)>0thenu=1:c=3:w=8:gosub211
  101. 100 u=0:ifp(4)>0thenc=4:gosub211
  102. 101 ifp(5)>0thenu=1:c=5:w=2:gosub211
  103. 102 u=0:ifp(13)>0thenu=1:c=13:w=16:gosub211
  104. 103 u=0:ifp(14)>0thenc=14:gosub211
  105. 104 ifp(15)>0thenc=15:gosub211
  106. 105 ifb=1then71
  107. 106 goto64
  108. 107 q=0:ifb=1then109
  109. 108 poke1074,81:poke55346,6:pt=4:goto111
  110. 109 u=0:ifpt=4 and p(1)>0thenu=1:gosub204:q=1:goto111
  111. 110 ifpt=4thengosub207:q=1
  112. 111 u=0:ifp(3)>0thenc=3:gosub211
  113. 112 ifp(4)>0thenc=4:gosub211
  114. 113 ifp(5)>0thenu=1:c=5:w=2:gosub211
  115. 114 u=0:ifp(8)>0 and d1=2 and d2=2thenu=1:c=8:w=8:gosub211:goto116
  116. 115 ifp(8)>0thenc=8:gosub211
  117. 116 u=0:forc=12to15:ifp(c)>0thengosub211
  118. 117 next:ifp(16)>0thenu=1:c=16:w=3:gosub211
  119. 118 ifq=0then71
  120. 119 goto64
  121. 120 q=0:ifb=1then122
  122. 121 poke1077,81:poke55349,6:pt=5:goto124
  123. 122 u=0:ifpt=5 and p(1)>0thenu=1:gosub204:q=1:goto124
  124. 123 ifpt=5thengosub207:q=1
  125. 124 u=0:forc=3to5:ifp(c)>0thengosub211
  126. 125 next:forc=12to15:ifp(c)>0thengosub211
  127. 126 next:ifp(17)>0thenu=1:c=17:w=2.5:gosub211
  128. 127 ifq=0then71
  129. 128 goto64
  130. 129 q=0:ifb=1then131
  131. 130 poke1080,81:poke55352,6:pt=6:goto133
  132. 131 u=0:ifpt=6 and p(1)>0thenu=1:gosub204:q=1:goto133
  133. 132 ifpt=6thengosub207:q=1
  134. 133 u=0:forc=3to5:ifp(c)>0thengosub211
  135. 134 next:ifp(6)>0thenu=1:c=6:w=2:gosub211
  136. 135 u=0:ifp(9)>0 and d1=3 and d2=3thenu=1:c=9:w=10:gosub211:goto137
  137. 136 ifp(9)>0thenc=9:gosub211
  138. 137 u=0:forc=12to15:ifp(c)>0thengosub211
  139. 138 next:ifp(18)>0thenu=1:c=18:w=2.2:gosub211
  140. 139 ifq=0then71
  141. 140 goto64
  142. 141 ifb=1then144
  143. 142 u=0:ifp(2)>0thengosub207:goto146
  144. 143 u=1:gosub204:goto146
  145. 144 u=0:ifp(1)>0thengosub204:goto146
  146. 145 u=1:gosub207
  147. 146 u=0:forc=3to14:ifp(c)>0thengosub211
  148. 147 next:ifp(15)>0thenu=1:w=5:gosub211
  149. 148 u=0:forc=16to21:ifp(c)>0thengosub211
  150. 149 next:goto64
  151. 150 q=0:ifb=1then152
  152. 151 poke1083,81:poke55355,6:pt=8:goto154
  153. 152 u=0:ifpt=8 and p(1)>0thenu=1:gosub204:q=1:goto154
  154. 153 ifpt=8thengosub207:q=1
  155. 154 u=0:forc=3to5:ifp(c)>0thengosub211
  156. 155 next:ifp(7)>0thenu=1:c=7:w=2:gosub211
  157. 156 u=0:ifp(10)>0 and d1=4 and d2=4thenu=1:c=10:w=10:gosub211:goto158
  158. 157 ifp(10)>0thenc=10:gosub211
  159. 158 u=0:forc=12to15:ifp(c)>0thengosub211
  160. 159 next:ifp(19)>0t